using UnityGameFramework.Runtime;

namespace LS.UGFUnits
{
    using Unity.VisualScripting;
    
    [UnitCategory("Unity Game Framework/Resource")]
    public abstract class ResourceUnit : FrameworkComponentUnit<ResourceComponent>
    {
        [DoNotSerialize]
        public override ResourceComponent Target
        {
            get
            {
                var com = FrameworkObserver.Observing() ? FrameworkObserver.Resource : null;
                CheckFrameworkAvailable();
                return com;
            }
        }
    }
}